# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: M0Rf30
# Contributor: Dan Serban
# Contributor: zbito <ztokarczyk at gmail dot com

pkgname=steadyflow
pkgver=0.2.0
pkgrel=11
pkgdesc='Simple download manager for GNOME'
arch=('loong64' 'x86_64')
url='https://launchpad.net/steadyflow'
license=('GPL3')
depends=('gtk3' 'gvfs' 'libgee' 'libnotify')
makedepends=('cmake' 'ninja' 'vala')
source=("https://launchpad.net/$pkgname/trunk/$pkgver/+download/$pkgname-$pkgver.tar.xz"
        'steadyflow.appdata.xml'
        'fixes.patch')
sha256sums=('ab1f23d52be78c952979ee0bb1778b8bf4664145c6fb28db219d516aae7dddb6'
            '928326b0559cdad5f181beaaeb5df21513d910ed1cbcb2ea7bac16de15fda678'
            'cded29dcee677e515a80cda6aad234e35150c0424d9abc332cb2554ce45580bc')

prepare() {
  cd $pkgname-$pkgver
  # Various fixes
  patch -Np1 -i ../fixes.patch
}

build() {
  cmake -S $pkgname-$pkgver -B build -G Ninja -DCMAKE_INSTALL_PREFIX='/usr' \
    -DCOMPILE_GSETTINGS_ON_INSTALL=OFF -DWANT_AYATANA=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 steadyflow.appdata.xml "$pkgdir/usr/share/metainfo/steadyflow.appdata.xml"
}
